<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head lang="zh-CN">
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link href="${pageContext.request.contextPath}/css/bootstrap.min.css" rel="stylesheet">
    <script src="${pageContext.request.contextPath}/js/jquery-1.7.2.min.js"></script>
    <script src="${pageContext.request.contextPath}/js/jquery.min.js"></script>
    <script src="${pageContext.request.contextPath}/js/bootstrap.min.js"></script>
      <script src="${pageContext.request.contextPath}/js/jquery.validate.min.js"></script>
    <script src="${pageContext.request.contextPath}/js/messages_zh.js"></script>
<title>Insert title here</title>
<style type="text/css">
	.inp1{
		width: 200px;
		background-color: #fff;
							    background-image: none;
							    border: 1px solid #ccc;
							    border-radius: 4px;
							    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset;
							    color: #555;
							    font-size: 14px;
							    height: 34px;
							    line-height: 1.42857;
							    padding: 6px 12px;
	}
</style>
</head>
<script type="text/javascript">
	$(function(){
		//取消订单
		$("#delorder").click(function(){
			var cancel = 1;
			$.ajax({
				type:"post",
				url:'emptycar',
				data:{"cancel": cancel},
				success:function(data){
					alert("购物车空空如也，赶紧选购吧");						
				}
			})
		});
		//查询商家
		$("#searchseller").click(function(){
			var sname = $("#searchsname").val();
			var sgenre = $("select option:selected").val();
			$.ajax({
				   type: "POST",
				   url: "enterusermain",
				   data: {
					shopname:sname ,
					shopgenre:sgenre
				   },
				   dataType:'text',
				   success: function(data){
					   
				    	alert(data);
					  
				   }
				});
		});
		$("").click(function(){
			alert(1)
		
			
		});
	});
	
</script>
<body>
	<div style="height: 100%;width: 100% ;">
		<!-- 导航栏 -->
		<div style="background-color:#BFBDC2" class="navbar navbar-default navbar-fixed-top" role="navigation">
			<div class="container-fluid">
		    	<div class="navbar-header">
		      	<a class="navbar-brand" href="enterusermain"><img alt="加载失败" src="img/elmlogo.png" style="width:60px;heigth:28px"/></a>  <!-- logo标题 -->
		    	</div>
		
		    	<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
			  <ul class="nav navbar-nav navbar-right" style="margin-right: 50px">
			        	<li class="dropdown">
							<a href="#" class="dropdown-toggle" data-toggle="dropdown"><img alt="" src="img/order.png">我的订单<span class="caret"></span></a>
			        			<ul class="dropdown-menu" role="menu">
			        			<li><a href="pastuserorder">过往订单</a></li>
					            <li class="divider"></li>
					            <li><a href="currentuserorder">当前订单</a></li>
			        		</ul>
			        	</li>

			        	<li><a href="favorite"><img alt="" src="img/favorite.png" style="90%">我的收藏</a></li>
			        	<li><a href="shoppingcar"><img alt="" src="img/shoppingcar.png">我的购物车</a></li>
			        	<li><a href="updateuserinfo">修改信息</a></li>
			        	<li><a href="index.jsp">退出登录</a></li>
			      	</ul>
		    	</div><!-- /.navbar-collapse -->
		  	</div><!-- /.container-fluid -->
		</div>
		
		<!-- 搜索窗口 -->
		<div style="float: right; margin-top: 80px; margin-right:50px; text-align: center; width:30%;">

		</div>
		<div class="row" style="height: 400px;">
		<div class="col-md-12">
			<div class="col-md-1"></div>
			<div class="col-md-4"><img src="/upload${aseller.sellerimg} " width="300px"; height="270px"></div>
			<div class="col-md-4">
				<h3 >${aseller.shopname}</h3>
				<br>
				<br>
				<p>店铺分类:&nbsp;&nbsp;${aseller.shopgenre}</p>
				<br>
				<br>
				<p>商家电话:&nbsp;&nbsp;${aseller.sellerphone}</p>
				<br>
				<br>
				<p>商家地址:&nbsp;&nbsp;${aseller.selleraddr}</p>
			</div>
			<div class="col-md-3"></div>
			<p style="margin-top: 50px">喜欢本店的话那就收藏吧</p>
			<span>${favorite}</span>
			</div>
			
		</div>
		<hr>
			<div class="container">
			<div  class="col-md-12"	>
			<form action="addtoshoppingcar" method="post">
			     <c:forEach  items="${foods}" var="food"  varStatus="f">
			     	<div class="col-md-3" style="margin-top: 50px">
			     <p>${food.foodname}</p>
				    <img alt="" src="/upload${food.foodimg}" style="width: 50%;height: 100px;">
			     		<span style="margin-left: 10px;">${food.foodprice}</span>
			     
			     	<a href="addcar?id=${food.foodid}"><img alt=""  src="img/shoppingcar.png"></a>
			    </div>
			    
			
			     </c:forEach>
			  
			</div>
					<div class="page" id="page" style="text-align: center;">
				 <ul class="pagination">
					   ${foodpage}
 				 </ul>
		</div>
	
	
		<hr>
					<div class="container">
					<div  class="col-md-2"	>
					评论区:
					</div>
			<div  class="col-md-8"	>
				
			     <c:forEach  items="${discuss}" var="dis"  varStatus="f">
			     	<div class="col-md-10" style="margin-top: 50px">
			     <p style="margin-top: 20px" ></a></p>
				       <p>${dis.message}</p>  	
			    </div> 
			     </c:forEach>
			    
			</div>
					<div class="page" id="page" style="text-align: center;">
				 <ul class="pagination">
					   ${discusspage}
 				 </ul>
		</div>
		<div  class="col-md-2"	>
		</div>
		<div  class="col-md-12"	>
			<form action="adddiscuss" method="post">
				<textarea class="form-control" rows="3" name="msg"></textarea>
				<br>
				<br>
				<input type="submit" value="我也要说" class="btn btn-default">
			</form>
		</div>	
				
	</div>
</body>
</html>